﻿using System.Configuration;
using System.Linq;

namespace BulkUploadGovernanceFiles
{
    public class ConfigManager
    {
        public class GovernanceInputFile
        {
            public static string ConnectionString
            {
                get { return ConfigurationManager.ConnectionStrings["GovenanceInputFile"].ConnectionString; }
            }
            public static string DataBaseName
            {
                get
                {
                    //return ConfigurationManager.AppSettings["GovenanceInputFileDataBase"];
                    return ConnectionString.Split('/').Last();
                }
            }
        }

        public class GovernanceDw
        {
            public static string ConnectionString
            {
                get { return ConfigurationManager.ConnectionStrings["GovenanceDW"].ConnectionString; }
            }
            public static string DataBaseName
            {
                get
                {
                    //return ConfigurationManager.AppSettings["GovenanceDWDataBase"];
                    return ConnectionString.Split('/').Last();
                }
            }
        }

        public class ClientDw
        {
            public static string ConnectionString
            {
                get { return ConfigurationManager.ConnectionStrings["ClientDW"].ConnectionString; }
            }
            public static string DataBaseName
            {
                get
                {
                    //return ConfigurationManager.AppSettings["ClientDW"];
                    return ConnectionString.Split('/').Last();
                }
            }

            
        }
        public class ClientPlatform
        {
            public static string ConnectionString
            {
                get { return ConfigurationManager.ConnectionStrings["ClientPlatform"].ConnectionString; }
            }

            public static string DataBaseName
            {
                get
                {
                    //return ConfigurationManager.AppSettings["ClientPlatform"];
                    return ConnectionString.Split('/').Last();
                }
            }

            
        }

        public class S3Bucket
        {
            public static string AccessKeyId
            {
                get { return ConfigurationManager.AppSettings["accesKeyId"]; }
            }

            public static string SecretAccessKey
            {
                get { return ConfigurationManager.AppSettings["awsSecretKey"]; }
            }
            public static string ServiceEndPoint
            {
                get { return ConfigurationManager.AppSettings["s3ServiceEndPoint"]; }
            }

            public static string BucketName
            {
                get { return ConfigurationManager.AppSettings["s3Bucket"]; }
            }

            public static string FolderName
            {
                get { return ConfigurationManager.AppSettings["s3BucketFolderName"]; }
            }
        }
    }
}
